<!--用户管理-->
<template>
  <div class="page-container">
    <ex_super_table_page v-bind="option" ref="superTablePage">
    </ex_super_table_page>

  </div>
</template>
<script>


  export default {

    title: 'label_available_quota',
    components: {},

    data() {

      let _this = this

      return {

        dialogFormVisible: false,
        dialogTitle: '',
        formValue: {
          'type': 'DONE'
        },
        rules: {
          companyName: [
            {required: true, message: this.$tt('tip_can_no_empty'), trigger: 'blur'},
            {min: 3, max: 32, message: this.$tt('tip_length_in_min_max',{min:3,max:32}), trigger: 'blur'}
          ],
          companyShortCode: [
            {required: true, message: this.$tt('tip_can_no_empty'), trigger: 'blur'},
            {min: 3, max: 16, message: this.$tt('tip_length_in_min_max',{min:3,max:16}), trigger: 'blur'}
          ]
        }
      };
    },


    watch: {
    },

    created() {


      this.option = {
        search: {
          model: [
            {
              label: "label_fms_account_cmp_is_product", key: "productType", type: 'select', enum: 'PmsProductTypeEnum', attrs: {clearable: true},
            },
          ],
        },
        action: [
        ],

        table: {
          url: "/fms-api/client/FmsClientRpc/queryCreditApply.json",
          attrs: {
            'cell-style': ({ row, column, rowIndex, columnIndex }) => {
              if (column.property == 'status') {
                return { color: row.status == 'NORMAL' ? this.$globalCss.successColor : this.$globalCss.infoColor }
              }
            }
          },
          model: [
            {
              key: 'accountType', label: 'label_account_type', width: 120,
              attrs: {
                formatter: (r, c, v, i) => {
                  return this.$enumShow(v, 'CustomerAccountTypeEnum')
                }
              }
            },
            {
              key: 'productType', label: 'label_fms_account_cmp_is_product', width: 120,
              attrs: {
                formatter: (r, c, v, i) => {
                  return this.$enumShow(v, 'PmsProductTypeEnum')
                }
              }
            },
            {
              key: 'currencyType', label: 'label_account_currency', width: 120,
              attrs: {
                formatter: (r, c, v, i) => {
                  return this.$enumShow(v, 'CurrencyTypeEnum')
                }
              }
            },

            { key: 'oldCreditAmount', label: 'label_fms_account_apply_old_quota', align: 'left' },
            { key: 'newCreditAmount', label: 'label_fms_account_apply_adjust_quota', align: 'left' },
            // { key: 'modifyAmount', label: '变更金额', align: 'left' },
            { key: 'submitUserName', label: 'label_fms_account_apply_apply_user', align: 'left', width: 120 },
            { key: 'submitTime', label: 'label_fms_account_apply_apply_date', attrs: { formatter: (r, c, v, i) => { return this.$dateFormat(v) } } },


            {
              key: 'status', label: 'label_status',
              width: 120,
              attrs: {
                formatter: (r, c, v, i) => { return this.$enumShow(v, 'FmsCreditApplyStatus') }
              }
            },

            { key: 'auditUserName', label: 'label_fms_account_apply_audit_user', align: 'left', width: 120 },
            { key: 'auditTime', label: 'label_fms_account_apply_audit_date', attrs: { formatter: (r, c, v, i) => { return this.$dateFormat(v) } } },
            { key: 'applyReason', label: 'label_fms_account_apply_apply_reason', align: 'left', width: 120 },

            { key: 'refuseReason', label: 'label_fms_account_apply_refuse_reason', align: 'left', width: 120 },

          ]
        }
      }

    },

    props: {

    },

    destroyed() {

    },

    methods: {
    }
  };

</script>
<style>
  .small-btn span {
    font-size: 14px;
  }

  .small-btn .el-button--small span {
    font-size: 14px;
  }
</style>
